{extend name="base" /} {block name="body"}
<div class="layui-body">
	<div class="navbar">
		<a><cite>代理管理</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>代理列表</cite></a>
	</div>
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<form class="layui-form layui-form-pane" action="" method="get">
		<blockquote class="layui-elem-quote">
			<div class="layui-inline">
				<div class="layui-input-inline">
					<input type="text" value="{$agent_name}" name="agent_name" placeholder="请输入代理名称" class="layui-input">
				</div>
				<div class="layui-input-inline">
					<input type="text" value="{$mobile}" name="mobile" placeholder="请输入代理帐号" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<select name="status">
					<option value="0">审核状态</option>
					<option value="1" {if $status=='1' }selected{/if}>正常</option>
					<option value="2" {if $status=='2' }selected{/if}>冻结</option>
				</select>
			</div>
			<a class="layui-btn search_btn"><i class="fa fa-search"></i> 查询</a>
			<a class="layui-btn layui-btn-status page-btns" href="{:url('status',['table'=>'agent','val'=>1])}"><i class="fa fa-check-circle-o"></i> 启用</a>
			<a class="layui-btn layui-btn-danger page-btns" href="{:url('status',['table'=>'agent','val'=>2])}"><i class="fa fa-ban"></i> 冻结</a>
			<a class='layui-btn layui-btn-normal'onclick="shop_add('{:url('shop/shop_add')}')"><i class='fa fa-plus-circle'></i>添加</a>
		</blockquote>
		</form>
		<div class="layui-tab-content">
			<table class="layui-table layui-form">
				<thead>
					<tr>
						<th style="width: 30px;">
							<input type="checkbox" lay-skin="primary" lay-filter="allChoose">
						</th>
						<th class="text-center">ID</th>
                        <th class="text-center">代理名</th>
                        <th class="text-center">代理帐号</th>
                        <th class="text-center">余额</th>
                        <th class="text-center">地址</th>
                        <th class="text-center">注册时间</th>
                         <th class="text-center">帐号状态</th>
                        <th class="text-center">认证状态</th>
					</tr>
				</thead>
				<tbody>
					<form id="listForm">
						{foreach name="list" item="vo"}
						<tr>
							<td>
								<input type="checkbox" name="ids[]" value="{$vo.id}" class="layui-checkbox checkbox-ids" lay-skin="primary">
							</td>
							<td>{$vo.id}</td>
							<td>{$vo.agent_name}</td>
							<td>
								{$vo.mobile}
							</td>
							<td>{$vo.balance}</td>
							<td>{$vo.address}</td>
							<td>{$vo.add_time}</td>
								<td>{if $vo.status==1}正常{else}已冻结{/if}</td>
							<td>{if $vo.is_verify==2}已认证{else}未认证{/if}</td>
						</tr>
						{/foreach}
					</form>
				</tbody>
			</table>
			{$list->render()}
		</div>
	</div>
</div>
{/block}
{block name="js"}
<script>

		function shop_add(url) {
		layer.open({
			type: 2,
			title: '添加代理',
			shadeClose: true,
			shade: 0.8,
			area: ['70%', '90%'],
			content: url
		});
	}
</script>
{/block}